package com.yyfax.pay.order.data.service;

import com.yyfax.framework.common.OpResponse;
import com.yyfax.pay.order.model.po.NotifyTaskPO;
import com.yyfax.pay.order.model.po.UserAuthPO;
import com.yyfax.pay.order.model.po.UserPaymentPO;
import com.yyfax.pay.third.model.to.fuiou.ProtocolPayNotifyReq;
import com.yyfax.pay.vo.order.ProtocolPayQueryReq;
import com.yyfax.pay.vo.order.ProtocolPayQueryRsp;
import com.yyfax.pay.vo.order.ProtocolPayReq;

public interface ProtocolPayService {

	/**
	 * 协议支付接口
	 * 
	 * @author wangjwy
	 * @date 2018/6/7 16:00
	 * @since 2.2.0
	 * @param params, merchantCode
	 * @return void
	 * @throws Exception
	 */
	public OpResponse pay(ProtocolPayReq params, String merchantCode);

	/**
	 * 协议支付处理异步通知
	 * 
	 * @author wangjwy
	 * @date 2018/6/8 14:09
	 * @since 2.2.0
	 * @param req
	 * @return void
	 * @throws Exception
	 */
	public void handNotifyResult(ProtocolPayNotifyReq req);

	/**
	 * 查询协议支付订单结果
	 * 
	 * @author wangjwy
	 * @date 2018/6/8 19:58
	 * @since 2.2.0
	 * @param params
	 * @return com.yyfax.pay.vo.order.ProtocolPayQueryRsp
	 * @throws Exception
	 */
	public OpResponse checkResult(ProtocolPayQueryReq params, String merchantCode);

	// public void savePayExt(UserAuthPO userAuthPO, UserPaymentPO userPaymentPO);

	/**
	 * 查询
	 * 
	 * @author wangjwy
	 * @date 2018/6/19 9:55
	 * @since 2.2.0
	 * @param busiId
	 * @return boolean
	 * @throws Exception
	 */
	boolean queryResult(String busiId);

	/**
	 * 通知业务
	 * 
	 * @author wangjwy
	 * @date 2018/6/19 9:54
	 * @since 2.2.0
	 * @param task
	 * @return java.lang.String
	 * @throws Exception
	 */
	String notifyProtocolOrder(NotifyTaskPO task);
}
